package com.pearl.jacksoncore.demo.feature;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.pearl.jacksoncore.demo.pojo.Org;
import com.pearl.jacksoncore.demo.pojo.Role;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author TD
 * @version 1.0
 * @date 2024/3/18
 */
public class User {
    // 用户ID
    @JsonIgnore
    private Long id;

    private long userId;

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    List<Org> orgList;

    BigDecimal num;

    public BigDecimal getNum() {
        return num;
    }

    public void setNum(BigDecimal num) {
        this.num = num;
    }

    public List<Org> getOrgList() {
        return orgList;
    }

    public void setOrgList(List<Org> orgList) {
        this.orgList = orgList;
    }

    // 用户ID
    private Double aDouble;
    // 姓名
    private String name;
    // 年龄
    private Integer age;

    public String addr;

    // 所属机构
    private Org org;

    private Date birthday;

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    // 角色列表

    public Double getaDouble() {
        return aDouble;
    }

    public void setaDouble(Double aDouble) {
        this.aDouble = aDouble;
    }

    private List<Role> roleList;
    // 省略 getter\setter..........

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Org getOrg() {
        return org;
    }

    public void setOrg(Org org) {
        this.org = org;
    }

    public List<Role> getRoleList() {
        return roleList;
    }

    public void setRoleList(List<Role> roleList) {
        this.roleList = roleList;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", aDouble=" + aDouble +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", addr='" + addr + '\'' +
                ", org=" + org +
                ", roleList=" + roleList +
                '}';
    }
}
